<?php
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br>";
  }
else
  {
    move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]);
    echo $_SERVER['DOCUMENT_ROOT']."<br>";
    $archivo=$_SERVER['DOCUMENT_ROOT'].'financiera/backupsDb/upload/'.$_FILES["file"]["name"];
     echo "mysqldump --opt -u root  -h localhost financiera   <  ".$archivo."<br>";
 
   echo  system("mysqldump --opt -u root  -h localhost financiera   <  ".$archivo,$arr);
   var_dump($arr);
  }
?>
 
 

<html>
<body>

<form action="restaurar.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>

</body>
</html>